﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/PagePlaceMaster.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <script type="text/javascript" src="/Scripts/box.js"></script>
    <script type="text/javascript">
        ShowBox('applytp', ['btncheckinfo'], 'tempcontainer', 'id',
            function () {
                $.ajax({
                    type: 'get',
                    url: '/Home/CheckisAuthentication',
                    cache:false,
                    beforeSend: function () {
                        $('#applycheck').html('<div style="margin-top: 15px; margin-left: 20px; float: left;"><img src="/Content/images/Loading.png" width="60px" height="60px;" alt="loading" /></div><div style="margin-top: 40px; margin-left: 5px; font-size: 17px; font-weight: bold;">身份验证中</div>');
                    },
                    success: function (result) {
                        if (result == 1) {
                            $.ajax({
                                type: 'get',
                                url: '/Home/CheckIsMaster',
                                cache:false,
                                beforeSend: function () {
                                    $('#tempcontainer').html('<div style="margin-top: 15px; margin-left: 20px; float: left;"><img src="/Content/images/Loading.png" width="60px" height="60px;" alt="loading" /></div><div style="margin-top: 40px; margin-left: 5px; font-size: 17px; font-weight: bold;">验证是否开通站点</div>');
                                },
                                success: function (result) {
                                    if (result != '') {
                                        $('#tempcontainer').html('<div style="margin-top:15px;margin-left:20px;float:left;" id="applycheck"><img src="/Content/images/tour20001.png" width="60px" height="60px;" alt="success" /></div><div style="margin-top:40px;margin-left:5px; font-size:17px; font-weight:bold;">您的站点为：' + result + '</div><div style="margin-top:30px;margin-left:5px; font-size:20px;">确认应用该模板请<a class="register" href="/Home/ApplyTemplete/<%=ViewData["Id"] %>">继续</a>，或者<a href="javascript:;" onclick="disablebox(\'tempcontainer\')">取消</a>应用</div>');
                                    }
                                    else {
                                        //未开通站点
                                        $('#tempcontainer').html('<div style="margin-top: 15px; margin-left: 20px; float: left;"><img src="/Content/images/stop.png" width="60px" height="60px;" alt="success" /></div><div style="margin-top: 40px; margin-left: 5px; font-size: 17px; font-weight: bold;">请先<a href="javascript:;">开通站点</a></div>');
                                    }
                                }
                            });
                        }
                        else {
                            //请先登录
                            $('#tempcontainer').html('<div style="margin-top: 15px; margin-left: 20px; float: left;"><img src="/Content/images/stop.png" width="60px" height="60px;" alt="success" /></div><div style="margin-top: 40px; margin-left: 5px; font-size: 17px; font-weight: bold;">请先登录</div>');
                            window.setTimeout(function () {
                                disablebox('tempcontainer');
                            }, 2000);
                            window.setTimeout(function () {
                                $('#btnlogonlink').trigger('click');
                            }, 3000);
                        }
                    },
                    error: function () {
                        $('#tempcontainer').html('<div style="margin-top: 15px; margin-left: 20px; float: left;"><img src="/Content/images/stop.png" width="60px" height="60px;" alt="success" /></div><div style="margin-top: 40px; margin-left: 5px; font-size: 17px; font-weight: bold;">操作失败，请稍后重试</div>');
                    }
                });
            });
    </script>
    <style type="text/css">
        #backgroundbox {
	        z-index: 100;
	        position: fixed;
	        width: 100%;
	        display: none;
	        height: 100%;
	        top: 0px;
	        left: 0px;
	        _position: absolute;
	        background-color: #000000;
	        overflow: hidden;
	        border: 1px solid #cecece;
        }
    </style>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<!-- breadcrumbs -->
<div class="breadcrumbs">
	<div class="shell">
		<p>Some intro message goes here</p>
		<h2>Our Projects</h2>
	</div>
</div>
<!-- end breadcrumbs -->
<!-- main -->
<div id="main">
	<div class="shell">
		
		<!-- project -->
		<div class="project">
			
			<h3>Sport Zone / <span><%=ViewData["templeteName"] %></span></h3>
			<!-- main image holder -->
			<div class="main-image-holder">
				<span class="four-arrows"></span>
				<div class="cl">&nbsp;</div>
				<div class="arrows-holder">
					<a href="#" class="arrow-left"></a>
					<a href="#" class="arrow-right"></a>
					<div class="cl">&nbsp;</div>
				</div>
				<div class="cl">&nbsp;</div>
				<div class="screenshots">
					<div class="inner-slider">
						<ul>
                            <%string[] images = (string[])ViewData["templeteimages"];
                              foreach (var src in images)
                              { %>
                              <li><img src="<%=src %>" alt="" /></li>
                            <%} %>
						</ul>
					</div>
				</div>
				<div class="cl">&nbsp;</div>
			</div>
			<!-- end main image holder -->
			
			<!-- description -->
			<div class="description">
				<p style="text-indent:20px;"><%=ViewData["descript"]%></p>
                <!--/Home/ApplyTemplete/ViewData["Id"]-->
				<a href="javascript:;" id="applytp" class="cross-btn"><span>选用</span></a>
				<div class="cl">&nbsp;</div>
			</div>
			<!-- end description -->
			
			<!-- thumb holder -->
			<div class="thumb-holder">
				<img src="<%=ViewData["mainimage"] %>" alt="" />
			</div>
			<!-- end thumb holder -->
			
			
			<div class="cl">&nbsp;</div>
		</div>
		<!-- end project -->
		
	</div>
</div>
<!-- end main -->
		<!-- footer push -->
		<div id="footer-push" class="notext">&nbsp;</div>
		<!-- end footer push -->

		<div class="applytemplete" id="tempcontainer" style="display:none;">
            
		</div>
        <div id="backgroundbox"></div>
</asp:Content>